﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// Base_Serial数据模型对象
    /// </summary>
    [Serializable]
    public partial class Base_SerialMod
    {
        /// <summary>
        /// 初始化Base_Serial数据模型对象
        /// </summary>
        public Base_SerialMod()
        {
            
        }
        /// <summary>
        /// 初始化Base_Serial数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="id">Id</param>
        public Base_SerialMod(int id)
        {
            //给Id字段赋值
            this.Id = id;
        }
        
		//属性存储数据的变量
        private int _id;
        
        /// <summary>
        /// Id
        /// </summary>
        public int Id
        {
            get { return this._id; }
            set { this._id = value; }
        }
        
        /// <summary>
        /// 对比两个Base_Serial数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的Base_Serial数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成Base_Serial数据模型对象
            Base_SerialMod base_SerialMod = obj as Base_SerialMod;
            //判断是否转换成功
            if (base_SerialMod == null) return false;
            //进行匹配属性的值
            return
                //判断Id是否一致
                this.Id == base_SerialMod.Id;
        }
        /// <summary>
        /// 将当前Base_Serial数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将Base_Serial数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将Id进行按位异或运算处理
                this.Id.GetHashCode();
        }
        /// <summary>
        /// 将当前Base_Serial数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前Base_Serial数据模型对象转换成字符串副本
            return
                "[" +
                //将Id转换成字符串
                this.Id +
                "]";
        }
    }
}
